home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 4.1 KB | 138 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PART_H
- #define PART_H
-
- // ----- Part Layer -----
-
- #ifndef FWPARTNG_H
- #include "FWPartng.h"
- #endif
-
- #ifndef FWSELECT_H
- #include "FWSelect.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CContent;
- class FW_CGraphicContext;
- class FW_CMenuBar;
- class FW_CMenuEvent;
- class FW_CMouseEvent;
- class FW_CPresentation;
-
- class CProxy;
- class CPartContent;
- class CContainerSelection;
-
- //========================================================================================
- // class CContainerPart
- //========================================================================================
-
- class CContainerPart : public FW_CEmbeddingPart
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(CContainerPart)
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CContainerPart(ODPart* odPart);
- virtual ~ CContainerPart();
-
- virtual void Initialize(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_Boolean DoMenu(Environment* ev,
- const FW_CMenuEvent& theMenuEvent);
- virtual FW_Boolean DoAdjustMenus(Environment* ev,
- FW_CMenuBar* menuBar,
- FW_Boolean hasMenuFocus,
- FW_Boolean isRoot);
-
- virtual FW_CFrame* NewFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- FW_Boolean fromStorage);
-
- virtual FW_CContent* NewPartContent(Environment* ev);
-
- virtual void EmbeddedFrameRemoved(Environment *ev, FW_MProxy* proxy);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void AddProxyToPart(Environment* ev, CProxy* proxy);
-
- void DetachProxy(Environment* ev, CProxy* proxy);
- void AttachProxy(Environment* ev, CProxy* proxy);
-
- void DeleteProxy(Environment* ev, CProxy* proxy);
-
- CProxy* WhichProxy(Environment* ev,
- FW_CGraphicContext& gc,
- const FW_CPoint& where,
- FW_Boolean hasToBeSelected) const;
-
- FW_CPoint GetDrawingSize() const;
- FW_CPresentation* GetMainPresentation() const;
- CPartContent* GetPartContent() const;
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CPartContent* fPartContent;
-
- CContainerSelection* fContainerSelection; // Attention I don't own the selection the presentation is
- FW_CPresentation* fMainPresentation;
-
- FW_CPoint fDrawingSize;
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CContainerPart::GetPartContent
- //----------------------------------------------------------------------------------------
- inline CPartContent* CContainerPart::GetPartContent() const
- {
- return fPartContent;
- }
-
- //----------------------------------------------------------------------------------------
- // CContainerPart::GetDrawingSize
- //----------------------------------------------------------------------------------------
- inline FW_CPoint CContainerPart::GetDrawingSize() const
- {
- return fDrawingSize;
- }
-
- //----------------------------------------------------------------------------------------
- // CContainerPart::GetMainPresentation
- //----------------------------------------------------------------------------------------
- inline FW_CPresentation* CContainerPart::GetMainPresentation() const
- {
- return fMainPresentation;
- }
-
- #endif
-